﻿using Microsoft.Extensions.Configuration;

namespace Zhaoxi.ReadingPlatform.Tools
{
    public static class GlobalVariables
    {
        static readonly IConfigurationRoot configuration = new ConfigurationBuilder()
                    .AddJsonFile("dev.json").Build();
        static readonly Settings? _settings = configuration.GetRequiredSection("SqlConnectionInfo").Get<Settings>();

        #region 只读变量
        public static string SQLCONNECTIONURL { get; } = _settings.Detail;
        /// <summary>
        /// 所有跨域请求都通过
        /// </summary>
        public static readonly string ALL_CORS = "AllCors";
        #endregion
    }
}
